@extends('admin_system/public/layout')
@section('content')
    <div class="col-xs-12 top-nav nav">
        <p class="float-left"><strong>当前位置：</strong>app版本管理>>版本列表</p>
        <a class="btn btn-danger float-right mr10" aria-label="Left Align" href="/admin_system/appversion/edit">
            <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
            <span>添加版本</span>
        </a>
    </div>


    <div class="content-box col-xs-12 mt20 pb20 pt20">

        <table class="table table-hover table-bordered">
            <tr>
                <th>编号</th>
                <th>客户端</th>
                <th>版本名称</th>
                <th>版本编号</th>
                <th>更新时间</th>
                <th>上架</th>
                <th>更新内容</th>
                <th>操作</th>
            </tr>

            @foreach($apps as $p)
                <tr>
                    <td>{{$p->id}}</td>
                    <td>{{$p->client}}</td>
                    <td>{{$p->version_name}}</td>
                    <td>{{$p->version_code}}</td>
                    <td>{{$p->updated_at}}</td>
                    <td>
                        @if($p->is_show == 0)
                            <span>否</span>
                        @else
                            <span style="color:red;">是</span>
                        @endif
                    </td>
                    <td>
                        <ul>
                        @foreach($p->content as $con)
                            <li>{{$con}}</li>
                        @endforeach
                        </ul>
                    </td>
                    <td><a class="btn btn-danger btn-xs" href="/admin_system/appversion/edit?id={{$p->id}}">编辑</a></td>
                </tr>
            @endforeach
        </table>

        {!! $apps->links() !!}

    </div>
@endsection
